#!/bin/sh -e

if [ -d /run/systemd/system ] ; then
    systemctl --system daemon-reload >/dev/null || true
fi
if [ "$1" = "remove" ]; then
    if [ -x "/usr/bin/deb-systemd-helper" ]; then
        deb-systemd-helper mask bee-clef.service >/dev/null
    fi
fi
if [ "$1" = "purge" ]; then
    if [ -x "/usr/bin/deb-systemd-helper" ]; then
        deb-systemd-helper purge bee-clef.service >/dev/null
        deb-systemd-helper unmask bee-clef.service >/dev/null
    fi
    userdel -r bee-clef >/dev/null 2>&1 || true
fi
